home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
EGAVGA.SWG
/
0114_Set Border Colors.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-08-24
|
1KB
|
38 lines
program Demo_4_SWAG;
var
old_border : integer; { used in main body of program }
Rnd_border : integer;
(****************************************************************************)
procedure Set_Border(color:byte); { Written by Pat Roberts 1994 }
begin
asm
mov ah,10h { This subroutine sets the color value stored in the }
mov al,01h { overscan register of the current palette from the }
mov BH,Color { Bios thru int 10h . Assumes EGA\VGA }
int 10h
end;
end;
(****************************************************************************)
function Get_Border:byte; { Written by Pat Roberts 1994 }
begin
asm
mov ah,10h { This subroutine reads the color value stored in the }
mov al,08h { overscan register of the current palette from the }
int 10h { Bios thru int 10h. Assumes EGA\VGA }
mov @result,bH { result is byte(BL) not a integer(BX) }
end;
end;
(******************************Main******************************************)
begin
Randomize;
old_border := get_border;
writeln(' Old border color was ',old_border);
Rnd_border := ((random(7)+1));
set_border(rnd_border);
writeln(' Get_Border reports color ',get_border); readln; end.
end.